<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Insert title here</title>
		
		<link rel="stylesheet" type="text/css" href="jslib/jquery-easyui-1.4/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="jslib/jquery-easyui-1.4/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="jslib/jquery-easyui-1.4/demo/demo.css">
		
		<script src="jslib/jquery-easyui-1.4/jquery.min.js" type="text/javascript"></script>
		<script src="jslib/jquery-easyui-1.4/jquery.easyui.min.js" type="text/javascript"></script>
		
		<script src="jslib/Highstock-2.1.6/highstock.js" type="text/javascript"></script>
		
		<script src="jslib/papaparse/papaparse.js" type="text/javascript"></script>
	</head>
	<body>
		this is home page<br />
		<form action="home" method="get">
			<input name="username" />
			<button type="submit">submit</button>
		</form><br />
		<a href="stock">stock</a><br />
		<a href="foreign_exchange">foreign exchange</a>
		<br />
		<div id="container" style="min-width:800px;height:400px"></div>
		<div id="test"></div>
		
	</body>
	
	<script type="text/javascript">
	$(function () {
		alert('11111111111111');
		$.get('http://download.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=AUDUSD=x', function(result){
			alert('22222222222');
    		$('#test').html(result);
  		});
		
		
		/*Papa.parse('http://download.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=AUDUSD=x', {
	        download: true,
	        complete: function(results) {
	            var data = results.data, html;
	            for(var i = 1, _l = data.length-1; i < _l; i++) {
	                var item = data[i];
	                html += '<tr><td>'+item[0].substring(1)+'</td><td>'+item[1].substring(1)+'</td><td>'+item[2].substring(1)+'</td><td>'+item[3].substring(1)+'</td></tr>';
	            }
	            $('#test').append(html);
	        }
	    });*/
		
		
	    /*$.getJSON('http://download.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=AUDUSD=x', function (data) {
	    	for(var i = 0; i < data.rows.length; i++) {
	            $('#test').append('<p>' + data.rows[i].realName + '</p>');
			}
	        $('#container').highcharts('StockChart', {
	            rangeSelector : {
	                selected : 1
	            },
	            title : {
	                text : 'AAPL Stock Price'
	            },
	            series : [{
	                name : 'AAPL',
	                data : data,
	                tooltip: {
	                    valueDecimals: 2
	                }
	            }]
	        });
	    });*/

	});
	</script>
</html>